package com.augurit.smartform.entity;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

@Entity
@Table(name = "SM_FUNCTION")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class SmFunction {
	private Long id;						//主键
	private Long pageId;					//页面ID
	private String fieldId;					//字段ID
	private String event;					//字段对应的事件
	private String function;				//字段对应的事件处理函数名称
	private String argument;				//函数调用的参数
	public String getArgument() {
		return argument;
	}
	public void setArgument(String argument) {
		this.argument = argument;
	}
	@Id
    @SequenceGenerator(name="SEQ_SM_FUNCTION", sequenceName="SEQ_SM_FUNCTION", allocationSize=1)
    @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="SEQ_SM_FUNCTION")
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public Long getPageId() {
		return pageId;
	}
	public void setPageId(Long pageId) {
		this.pageId = pageId;
	}
	public String getFieldId() {
		return fieldId;
	}
	public void setFieldId(String fieldId) {
		this.fieldId = fieldId;
	}
	public String getEvent() {
		return event;
	}
	public void setEvent(String event) {
		this.event = event;
	}
	public String getFunction() {
		return function;
	}
	public void setFunction(String function) {
		this.function = function;
	}
}
